//
// Created by gogoqiu on 2022/2/12.
//

#include "DemoDialog.h"
#include "DhBitmapButton.h"

BEGIN_EVENT_TABLE ( DemoDialog, wxFrame )
                //EVT_MENU ( ACTION_EVENT, PreferencesFrame::OnActionEvent )
END_EVENT_TABLE()

/*
 * load data on app load
 * engine
 * frame, window
 * 总是存在
 * 是不是都可以通过消息获得
 * 联动一起关闭
 * 设置的变量就是一个frame的变量
 * 本地调节，然后同步到数据库
 * 异地获取，通过app转发
 * https://bbs.csdn.net/topics/360120190?list=2005662
 * wxwidgets如何发送自定义消息给APP类
 * */
DemoDialog::DemoDialog(wxWindow *parent): wxFrame( parent, wxID_ANY, "配置", wxDefaultPosition, wxDefaultSize,
    wxDEFAULT_FRAME_STYLE ^ wxMAXIMIZE_BOX ^ wxRESIZE_BORDER ){
    CreateStatusBar();
    SetStatusText("Welcome to wxWidgets!");
    auto *sizer = new wxBoxSizer( wxHORIZONTAL );
    auto *button = new wxButton( this, wxID_ANY, " 确定" );
    //
    auto *but = new DhBitmapButton( this, wxID_ANY );
    sizer->Add( button );
    sizer->Add( but );
    this->SetSizer( sizer );
}
